Optimal. Leaf size=33 \[ \frac {2 \tan (c+d x)}{a d (a \sec (c+d x)+a)}-\frac {x}{a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 35, normalized size of antiderivative = 1.06, number of steps used = 9, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3888, 3886, 3473, 8, 2606, 3767} \[ -\frac {2 \cot (c+d x)}{a^2 d}+\frac {2 \csc (c+d x)}{a^2 d}-\frac {x}{a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2606
Rule 3473
Rule 3767
Rule 3886
Rule 3888
Rubi steps
\begin {align*} \int \frac {\tan ^2(c+d x)}{(a+a \sec (c+d x))^2} \, dx &=\frac {\int \cot ^2(c+d x) (-a+a \sec (c+d x))^2 \, dx}{a^4}\\ &=\frac {\int \left (a^2 \cot ^2(c+d x)-2 a^2 \cot (c+d x) \csc (c+d x)+a^2 \csc ^2(c+d x)\right ) \, dx}{a^4}\\ &=\frac {\int \cot ^2(c+d x) \, dx}{a^2}+\frac {\int \csc ^2(c+d x) \, dx}{a^2}-\frac {2 \int \cot (c+d x) \csc (c+d x) \, dx}{a^2}\\ &=-\frac {\cot (c+d x)}{a^2 d}-\frac {\int 1 \, dx}{a^2}-\frac {\operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^2 d}+\frac {2 \operatorname {Subst}(\int 1 \, dx,x,\csc (c+d x))}{a^2 d}\\ &=-\frac {x}{a^2}-\frac {2 \cot (c+d x)}{a^2 d}+\frac {2 \csc (c+d x)}{a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 42, normalized size = 1.27 \[ \frac {\frac {2 \tan \left (\frac {c}{2}+\frac {d x}{2}\right )}{d}-\frac {2 \tan ^{-1}\left (\tan \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}}{a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.77, size = 42, normalized size = 1.27 \[ -\frac {d x \cos \left (d x + c\right ) + d x - 2 \, \sin \left (d x + c\right )}{a^{2} d \cos \left (d x + c\right ) + a^{2} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 2.82, size = 29, normalized size = 0.88 \[ -\frac {\frac {d x + c}{a^{2}} - \frac {2 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{2}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.48, size = 37, normalized size = 1.12 \[ \frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a^{2} d}-\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{2} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.92, size = 49, normalized size = 1.48 \[ -\frac {2 \, {\left (\frac {\arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac {\sin \left (d x + c\right )}{a^{2} {\left (\cos \left (d x + c\right ) + 1\right )}}\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.10, size = 22, normalized size = 0.67 \[ \frac {2\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {d\,x}{2}\right )}{a^2\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\tan ^{2}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________